The minimum-cost flow problem is finding the cheapest possible way of sending a certain amount of flow through a flow network.
Contents |
Given a flow network with source and sink , where edge has capacity , flow and cost . The cost of sending this flow is . You are required to send an amount of flow from s to t.
The definition of the problem is to minimize the total cost of the flow:
with the constraints
Capacity constraints: | |
Skew symmetry: | |
Flow conservation: | |
Required flow: |
A variation of this problem is to find a flow which is maximum, but has the lowest cost among the maximums. This could be called a minimum-cost maximum-flow problem. This is useful for finding minimum cost maximum matchings.
With some solutions, finding the minimum cost maximum flow instead is straightforward. If not, you can do a binary search on .
A related problem is the minimum cost circulation problem, which can be used for solving minimum cost flow. You do this by setting the lower bound on all edges to zero, and then make an extra edge from the sink to the source , with capacity and lower bound , forcing the total flow from to to also be .
The problem can be specialized into two other problems:
The minimum cost flow problem can be solved by linear programming, since we optimize a linear function, and all constraints are linear.
Apart from that, many combinatorial algorithms exist, for a comprehensive survey, see [1]. Some of them are generalizations of maximum flow algorithms, others use entirely different approaches.
Well-known fundamental algorithms (they have many variations):